#pragma once

#include "base/allocation.h"

namespace l8
{

// ----------------------------------------------------------------------------
// CPU
//
// This class has static methods for the architecture specific functions. Add
// methods here to cope with differences between the supported architectures.
//
// For each architecture the file cpu_<arch>.cc contains the implementation of
// these functions.

class CPU : public AllStatic
{
public:
    // Initializes the cpu architecture support. Called once at VM startup.
    static void Setup();

    // Flush instruction cache.
    static void FlushICache(void* start, size_t size);

    // Try to activate a system level debugger.
    static void DebugBreak();

private:
    DISALLOW_IMPLICIT_CONSTRUCTORS(CPU);
};

} // namespace l8
